package com.example.demo;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@Api(value = "PageController", description = "用户登录登出接口")
@Controller
@RequestMapping("/")
public class PageController {

    @ApiOperation(value="用户登录", notes="用户登录接口")
//    @ApiImplicitParams({
//          @ApiImplicitParam(name = "username", value = "用户名", required = true ,dataType = "string"),
//          @ApiImplicitParam(name = "passwd", value = "密码", required = true ,dataType = "string")
//    })
    //controller.method = 接口id  ,  controller = module,  method = cmd 是不是可用映射了
    //提供一套字符串生成唯一数值的方案，接口实现.
    @RequestMapping(value = "/login",method = {RequestMethod.POST})
    @ResponseBody
    public ModelMap login(Users data, HttpServletRequest request){
    	return null;
    }

}